const app = getApp()
Page({
	data: {
		resourceDomain: app.resourceDomain,
	},
	onLoad: function(options) {
		var that = this;
		app.request(app.apiDomain + "index.php?c=health&a=news", {
			type: options.type
		}, function(res) {
			that.setData({
				Medical: res.data.data,
			});
		});
		
		app.request(app.apiDomain + "index.php?c=health&a=category", {
			parentType: options.type
		}, function(res) {
			that.setData({
				fen_lei: res.data.data,
			});	
		});
	},
	hd_click: function(options) {
		var that = this;
		app.request(app.apiDomain + "index.php?c=health&a=news", {
			type:options.target.id,
		}, function(res) {
			that.setData({
				Medical: res.data.data,
			});
		});	
		app.request(app.apiDomain + "index.php?c=health&a=category", {
			type:options.target.id,
		}, function(res) {
			that.setData({
				fen_lei: res.data.data,
			});
		});	
	},
})
